﻿@using Novagoal.Website.Models.Views
@using Novagoal.Website.WebApp.Helpers

@model GamesCloseViewModel
           
<div style="margin-left:auto">
    @if(Model.Results.Count == 0){
        <p>Nadie puso un resultado para este partido</p>
    }
    @foreach (var result in Model.Results)
    {
        <div class="border" style="float:left; width:220px; height:70px; overflow:hidden; margin:5px; font-size:smaller">
            <table>
                <tr>
                    <td style="text-align:center">
                        @Html.GetAvatar(result.Key.Id, new { height = "50px" })<br />
                        @result.Key.FullName
                    </td>
                    <td style="text-align:center">
                        <span>Marcador: </span>
                        <span style="font-size:15px; font-weight:bold"> @result.Value.TeamAScore </span>
                        <span> - </span>
                        <span style="font-size:15px; font-weight:bold"> @result.Value.TeamBScore </span>
                        <br />
                        @{
                            var predictedPlayer = result.Value.Player == null ? "Ninguno" : result.Value.Player.Name;
                        }
                        <span>@predictedPlayer</span>
                    </td>
                    <td style="text-align:center; color:#FF4500">
                        <span style="font-size:15px">Puntos</span><br />
                        <span style="font-size:30px; font-weight:bold">@result.Value.Points</span>
                    </td>
                </tr>
            </table>
        </div>
    }
</div>
